SG Window | Window Object |
EnableMessageRange Method |
Properties Methods Events Constants Error Codes |
Enables or disables firing of the Message events and calling of callback interfaces for specified messages.
object.EnableMessageRange(startMsg As WinMsg, endMsg As WinMsg, Optional enable As Boolean = True)
Part | Description |
object | The object is expression that evaluates to Window object |
startMsg | Required. Message code of the first message that will be enabled or disabled. WinMsg enumerator lists constants that can be used as a value for this parameter. |
endMsg | Required. Message code of the last message that will be enabled or disabled. WinMsg enumerator lists constants that can be used as a value for this parameter. |
enable | Optional. If True message is enabled; otherwise message is disabled. Default value is True. |
To receive any message, you must enable it using EnableMessage or EnableMessageRange methods.
Following example shows how to enable mouse messages:
Public WithEvents wnd As SGWindow.Window Sub Form_OnLoad() Set wnd = new SGWindow.Window wnd.hWnd = Me.hWnd wnd.EnableMessageRange wm_MOUSEFIRST, wm_MOUSELAST wnd.Hooked = True End Sub